const cockpit = {
    state: {
        indexCode: 'zlzx',
        code: null,
        year: new Date().getFullYear().toString(),
        // 二级学院组
        collegelist: null,
        // 层面组
        levelOptions: null,
        // 归属部门组
        belongPartOptions: null
        // stateVal: '',
        // tableIndexCode: '',
        // tableCode: ''
    },
    mutations: {
        SET_PARAMS: (state, params) => {
            state.indexCode = params.indexCode;
            state.year = params.year;
            console.log(state.indexCode, state.year, 'indexCode');
        },
        SET_YEAR: (state, year) => {
            state.year = year
        },
        // SET_STATE_TABLECODE: (state, params) => {
        //     state.tableCode = params.tableCode;
        //     state.stateVal = params.state;
        // },
        SET_TABLECODE: (state, tableCode) => {
            state.tableCode = tableCode
        },
        SET_CODE: (state, code) => {
            state.code = code;
        },
        SET_INDEXCODE: (state, indexCode) => {
            state.indexCode = indexCode;
        },
        SET_COLLEGELIST: (state, collegelist) => {
            state.collegelist = collegelist
        },
        SET_LEVELOPTION: (state, levelOptions) => {
            state.levelOptions = levelOptions
        },
        SET_BELONGPART: (state, belongPartOptions) => {
            state.belongPartOptions = belongPartOptions
        }
    }
};
export default {
    namespaced: true,
    ...cockpit
};
